package com.lanyou.esb.cook.proxy.redis.proxy.impl;

import redis.clients.jedis.Jedis;

import com.lanyou.esb.cook.proxy.common.Constants4Redis;
import com.lanyou.esb.cook.proxy.entity.StoreForward;
import com.lanyou.esb.cook.proxy.redis.proxy.base.BaseStrJedisProxy;

/**
 * 存储转发统计表Redis操作代理
 * 
 * @author Davey.wu
 */
public class StoreForwardJedisProxy extends BaseStrJedisProxy<StoreForward> {
	/** 请求转发统计表前缀 **/
	public static final String KEYS_SUFFIX = Constants4Redis.PREFIX_REQFORWARD;

	public StoreForwardJedisProxy() {
		this.setTimeOut(Constants4Redis.REDIS_TIMEOUT_REQFORWARD);
	}

	@Override
	public String getKeyFromObject(StoreForward target) {
		// TODO Auto-generated method stub
		return KEYS_SUFFIX + KEY_SEPARATOR + target.getId();
	}

	public String get(Jedis jedis, String key) {
		return jedis.get(key);
	}
}
